home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / fractal.tre < prev    next >
Text File  |  1995-03-23  |  6KB  |  118 lines

  1. Article 1126 of comp.sys.handhelds:
  2. From: cgt@gargoyle.uchicago.edu (Carlos Talbot)
  3. Newsgroups: comp.sys.handhelds
  4. Subject: Fractal tree program for HP48SX
  5. Keywords: Fractals Graphics
  6. Message-ID: <cgt.651962395@gargoyle.uchicago.edu>
  7. Date: 29 Aug 90 20:39:55 GMT
  8. Sender: news@midway.uchicago.edu (News Administrator)
  9. Distribution: na
  10. Organization: University of Chicago
  11. Lines: 103
  12.  
  13.  
  14.  
  15. Here's a program I translated from a C program in the book "Fractal
  16. Programming in C" by Roger T. Stevens.  It asks for 6 variables:
  17. 1) Height:  This is the height of the trunk in pixels. 2) Left alpha:
  18. This is some number from 1 to 5.  The higher the number the longer
  19. the branches extend. 3) Right alpha:  Same goes for this one.
  20. 4) Left angle:  The higher the angle the greater the curvature of
  21. the branches.  5) Right angle:  Ditto for this one.  6) Recursion
  22. level:  The higher the number, the greater the detail(more branches).
  23. I wouldn't try a number higher than 14 because the twigs become too
  24. small to distinguish.  I've also included a PICT file named 'TREE'.
  25. To view place 'TREE' on stack, then PICT, then press STO.  Next go into
  26. graph.  This tree was generated with the parameters:12,2,2.2,20,28,10.
  27. This took about 25 minutes to draw!  Here's a list of parameters you
  28. might try.  Enjoy!
  29.  
  30. Height Left alpha  Right alpha Left Angle  Right Angle  Recursion
  31. ------ ----------  ----------- ----------  -----------  ---------
  32.   12       2.0        2.2         24           26           6
  33.   35       2.0        0.00001     55            0          10
  34.   13       3.0        3.0         33           33           9
  35.   25       1.2        1.2         90           90           6
  36.  
  37. -------------------------CUT HERE----------------------------
  38. begin 644 tree
  39. M2%!(4#0X+4*6*O!_!Q$    $5%523@2=+>!A(U0V@N0"!71U<G1T>3;2NQ]+
  40. M!))C(RLQ4 0 !5135$50!9TMX&$C5#:"Y (%='5R='AY-H*K D@N4$!7)T<G
  41. MA^0"!71U<G1T,RF F0  DC)%%^#>&@6UX=X:*S&P1"!4-H+D @5T=7)T>7DV
  42. M@JL"2"Y00%<G1R>'Y (%='5R='0S*8"9  "2,D47X-X:K+3AWAHK,;!$(#DV
  43. MLA(# @% 0"555$3@L0*/"  $ (,                                 
  44. M                                                            
  45. M                                "G\                  .C__PL 
  46. M                _O__/P               .#_____                
  47. M_/____\#              #______P<             @/_____O'P      
  48. M      # ______]_             .#W___W__\!            ^/______
  49. M_P$           "\_^_OW___!P           /Z_?_W___\/            
  50. M__?_S_OW[Q\          (#_/Y_^__O]/P          @/\OO_F__?]_    
  51. M      # _SS5B&O__W\          , [T;&(R_G[?P          X/\1$84I
  52. MR;__          #@,Q,2A1;___\!         / C'!*"_OFS_P,         
  53. M\%\0#$*'SH__ P        #P8B ,PH3U^_<#         &B#( @D1,C__P< 
  54. M        > 1!""0HJ)/_!P        #XCT\(%"CX\_<'         'AP\! 8
  55. M&.C1[P\         N \ $P@(V+#]!P        !X!  <" A\^.\/        
  56. M # # ! (" @V]@\         \ ( ( 0(] '\#P        !@ 0! ! @.!KH/
  57. M         * ! ( $A 'X_P\         0 $ @ 1$ "#D#P           P  
  58. M R0 0+@/               "' ! \ X               ($ ("Y#P      
  59. M        ! ( @/X%               $ @  ^0,               @!  #I
  60. M P              " $  -L#              "(  " ^@$             
  61. M )   (#>                4   ^/H               !@  "H?P      
  62. M         "   ' ?                (   8 \                @    
  63. M                 "                      (                   
  64. M   @                     "                      (           
  65. M           @                     "                      (   
  66. M                   @                     "                  
  67. M    (                                   B@ %4$])3E0%G2W@82/!
  68. M--+F @)X,6TN() 7T^8" G@R;2X@D"?C82/#+H*K FTN(( GT^8" G@Q":U!
  69. M*RIRZ;$2 _HNTMD"PRZ"JP)M+B"0)]/F @)Y,5WLL1(#^BXRDP(!        
  70. M";4O,I," @      < +5+[(2 [4OTMD";2X@D"?3Y@(">3$)K='F @)X,FTN
  71. M(( 7D] :!:_!>1LS*1    !Y5RE7X-X:*S%0_2+#+H*K FTN(( 7T^8" G@R
  72. M7>RQ$@/Z+M+9 C,I(        !APMAHK,5#](OXUDF,C*S&0'  (1T5.15)!
  73. M5$4(G2W@82.THD(K*L$TTN8" 7AM+A"0U^8"!FAE:6=H=&TN4!#F=L96UN8"
  74. M!6QE=F5L;2X@@!?3Y@(">3$>-M+F @%X5#:"Y (%='5R='AY-M+,(&TN$)!'
  75. M92-(+E! 5R='EY=G(\T,TN8"!FAE:6=H=%0V@N0"!71U<G1R>3;2S"!(+E! 
  76. M-455!(7D @5T=7)T>%0VTN8" G@Q>3;2S"!(+E! 5R='ET=E(VTN() 7DV<C
  77. MS0Q"92-M+E# 5F97QI9G(\FB@E,@;2X0@-?F @%Y;2X@@!?3Y@(">3%(+E! 
  78. MQ)3D5#3L(K@JT.8"!6QE=F5LM*+2Q1XK,:#O(ITMT.8" 7AM+A"0U^8" G@Q
  79. M;2X@D!>#Y (%4$])3E14-H+D @5T=7)T='DVTLP@2"Y0P&86YG:&Y ($5%52
  80. M3D@N4$!7)T>'A^0"!71U<G1Y2"XPP(9FUN8"!FAE:6=H=.ZM@>0"!6QF86YG
  81. M;2Y0P%9F5\:&Y ((1T5.15)!5$5M+A" U^8" 7EM+B" %]/F @)Y,4@N4 #U
  82. ME.1$164C2"Y00%<G1T>79R/-#(+D @5R=&%N9Y6I@>0"!%154DYM+B" %]/F
  83. M @)Y,4@N,,"&9M;F @9H96EG:'3NK8'D @5R=&%N9VTN4,!69E?&AN0""$=%
  84. M3D52051%*S%0_2+^-9)C(RLQ$$$ !41,24Y%!9TMX&$CP332Y@(">#%M+B"0
  85. M%]/F @)X,FTN() GXV$C;2X@@!<SDP(!      !0!F>KL6D9,RD0        
  86. M,M#F @)Y,0FML6D9WJ(R>!QM+B" )S.3 @$      % &9ZNQ:1DS*1      
  87. M   RT.8" GDR":VQ:1G>HC)X')CCX5\C.3:R$@,> 4#0%)3D1-#9 AXVDF$<
  88. ML*-")QPS*1         722<<,RD0        &%DM'%BH\24>+"IP @!%3E1%
  89. M4B!35$5-($A%24=(5"PJ4   RB2R]QPL*M ! $5.5$52($Q%1E0@C"PJ4   
  90. MRB2R]QPL*O ! $5.5$52(%))1TA4((PL*E   ,HDLO<<+"KP @!%3E1%4B!,
  91. M1494($)20T@N($%.1RXL*E   ,HDLO<<+"KP @!%3E1%4B!22%0N($)20T@N
  92. M($%.1RXL*E   ,HDLO<<+"K0 @!%3E1%4B!214-54E-)3TX@3%9,+BPJ4   
  93. MRB2R]QQ4-H+D @5L979E;'DVTLP@5#:"Y (%<G1A;F=Y-M+,(%0V@N0"!6QF
  94. M86YG>3;2S"!4-H+D @5R=&%L<'DVTLP@5#:"Y (%;&9A;'!Y-M+,(%0V@N0"
  95. M!FAE:6=H='DVTLP@M*)"*RJTHD(K*E0V@N0"!71U<G1T>3;2S"!4-H+D @5T
  96. M=7)T<GDVTLP@5#:"Y (%='5R='EY-M+,(%0V@N0"!71U<G1X>3;2S"!T*N"D
  97. M A4           #@I (5            L!(#\.)!*RHS*1         P22LJ
  98. MM*(23"-M+A" U^8" 7EM+B" %]/F @)Y,1XV@JL"2"XPP(9FYBTJFZ,R+RI(
  99. M+E# 9A;&!N?>&@6OT0(;V*BQ$@-E#8*K D@N,""'9N8M*INC,B\J2"Y0($<7
  100. MQ@;GWAH%K]$"&]BHL1(#90V"JP)M+B"0%]/F @%Y2"Y@@%:6=H9&=[8:V*BQ
  101. M$@-E#8*K FTN$(#7Y@(!>6TN(( 7T^8" GDQN"J Y (%1$Q)3D4K,7 !!$#V
  102. ML1(#OJ/1Y@(!>&TN$)#7Y@(">#%M+B"0%X/D @503TE.5%0V@N0"!71U<G1T
  103. M>3;2S"!(+E# 9A;F=H;D @1455).;2X@@!?3Y@(">3%(+C# AF:&Y (&:&5I
  104. M9VAT[JV!Y (%;&9A;F=(+E# 5F97QH;D @A'14Y%4D%416TN$(#7Y@(!>6TN
  105. M(( 7T^8" GDQ2"Y0 /64Y$1%92-(+E! 5R='1Y=G(\T,@N0"!7)T86YGE:F!
  106. MY ($5%523FTN(( 7T^8" GDQ2"XP((=FAN0"!FAE:6=H=.ZM@>0"!7)T86YG
  107. M2"Y0P%9F5\:&Y ((1T5.15)!5$7^-4*G D@N,""'9H;D @-L:&9(+F" 5I9V
  108. MAD:'Y (%;&9A;'!(+E @1Q?&!H?D @5L9F%N9T@N4"!'%^9VAN0"!6QE=F5L
  109. M2"Y00%<G1T>'Y (%='5R=')(+E! 5R='EX?D @5T=7)T>"LQX.\@?\9!IP(K
  110. ),0 O'CDVLA(#
  111.  
  112. end
  113.  
  114. Carlos Talbot
  115. {...!gargoyle!lucpum!ctalbot}
  116.  
  117.  
  118.